In microprocessors of recent years, a cache memory with low storage capacity and high speed composed of, for example, a Static Random Access Memory (SRAM), has been installed within or in the vicinity of the microprocessor, and by storing a part of data in the cache memory, the speed of the memory access of the microprocessor is increased.
With such a computer system, in the case of a mishit during a read access or a write access from a central processing unit to the cache memory, part of data newly read-out from a main storage unit is stored as an entry (registry entry) in an empty block of the cache memory. At this time, in the case where no empty block exists, entry replacement processing is necessary. In entry replacement processing, one of a plurality of blocks is selected; the entry stored in the selected block is returned to the main storage unit, resulting in an empty block; and newly read-out data is stored in this empty block. With the abovementioned entry replacement processing, a method which selects the block with the oldest accessed data, or in other words, the Least Recently Used (LRU) decoding method, is generally employed. With this LRU decoding method, usage efficiency of the cache memory improves, and as a result, execution speed of the microprocessor increases.
Among programs processed by the microprocessor, there is a special processing in which data is infrequently accessed but processing must be carried out at high speed once started, and processing in which data is frequently accessed, but not as high an execution speed is required.
Accordingly, in order to comply with this, a freeze function is included in the cache memory, such as in the conventional art of Patent Reference 1. The freeze function is a function which copies the program that has infrequently accessed data, but must be processed at high speed once started, into the cache memory in advance, and makes that domain unrewritable. By having this function, the computer system can read out the program from the cache memory when necessary and execute the program; through this, execution time is reduced. In addition, a purge function is a function which does not save the program that has frequently accessed data but requires not as high an execution speed is required, data, and the like within the cache memory, freeing up that domain. By having this function, space is freed up in the cache memory, allowing other programs and data with high priority to be taken into the cache memory, and through this, the usage efficiency of the cache memory improves, and an overall execution time is reduced.
Patent Reference 1: Japanese Laid-Open Patent Application No. 2003-200221